<?php 


$db =require 'db.php';

// 直接删除内存中的当前div
unset($db[$_GET['id']]);
sort($db);
$d = "<?php  \n  return    " .var_export($db,true). ";?>";

if(file_put_contents('db.php',$d)){

	$result = array(

		'state'=>'success',
		'message'=>'删除成功',

		);
	echo json_encode($result);
}else{
	$result = array(

		'state'=>'error',
		'message'=>'删除失败',
		);	
	echo json_encode($result);
}